import http from "../../utils/request"
import qs from 'qs'

//请求员工数据
export const listEmp = (params) =>{
  //返回一个promise对象
  //console.log(qs.stringify(params))
  return http.post('/employee/listEmp',qs.stringify(params));
}
//添加和修改
export const saveOrUpdateEmp = (data) =>{
  return http.post('/employee/saveOrUpdateEmp',qs.stringify(data));
}
//删除
export const delEmp = (data)=>{
  return http.post("/employee/delEmp",qs.stringify(data));
}
//根据员工id获取角色
export const editRoleByIdEmp = (data) => {
  return http.post("/employee/editRoleByIdEmp", qs.stringify(data));
}

export default {
  listEmp,
  saveOrUpdateEmp,
  delEmp,
  editRoleByIdEmp
}
